numberOfSectionsInTable isn't called when [arr count] is returned
Posted
by user315471
on Stack Overflow
See other posts from Stack Overflow
or by user315471
Published on 2010-04-13T12:51:40Z
Indexed on
2010/04/13
12:52 UTC
Read the original article
Hit count: 139
When I try returning the count of my newsItems array it breaks my application. I used NSLog to find out what the value of the newsItems count was when I returned 1.
Here is from NSLog 2010-04-13 07:48:40.656 RSS Feed[453:207] Values of num items 31 2010-04-13 07:48:40.656 RSS Feed[453:207] Number of items 31
Does anyone know why returning [newsItems count] would cause my application to break?
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
NSLog(@"Values of num items %d",[newsItems count]);
NSInteger *length = (NSInteger *)[newsItems count];
NSLog(@"Number of items %d",length);
return 1;
//return [newsItems count]; //This keeps breaking it for some reason
}
© Stack Overflow or respective owner